<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
	<!--      电催弹出层 -->
	<div id="dcrecord" class="dcrecord">
		<div class="hk-stuats">
			<input id="yh" name="statusPay" type="radio" value="01" /><label
				for="yh">已还</label> <input id="wh" name="statusPay" type="radio"
				value="02" checked="checked" /><label for="wh">未还</label>
		</div>
		<table cellpadding="0" cellspacing="0" border="0"
			class="buyinfor-table">
			<tr>
				<td align="right"><label class="control-label np">电催时间：</label>
				</td>
				<td><input id="dc_time" class="smallicontm form-control"
					onclick="laydate()" /></td>
				<td align="right"><label class="control-label np">允诺还款时间：</label>
				</td>
				<td><input id="promiss_time" class="smallicontm form-control"
					onclick="laydate()" /></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">逾期原因：</label>
				</td>
				<td colspan="3"><input type="hidden" id="dueResonVal" />
				<input id="dueReson" name="dueReson" type="text"
				class="form-control smalliconcur smallicon" readonly=""
				onclick="dueReson()" /></td>
			</tr>
			<tr>
				<td align="right" valign="top"><label class="control-label np">催收记录：</label>
				</td>
				<td colspan="3"><textarea id="csRecord" row="20" cols="5"
						class="form-control"></textarea></td>
			</tr>
		</table>
		<div class="padding-nono">
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
			<tr>
				<td width="100%" align="center">
					<div class="ibox-content">
						<button class="btn dpbtn_green" type="button"
							onclick="commitdcRecord();">提交</button>
						<button class="btn dpbtn_red" type="button" onclick="dccancel();">取消</button>
					</div>
				</td>
			</tr>
		</table>
		</div>
	</div>
	<!--      上门催收弹出层 -->
	<div id="smcsrecord" class="smcsrecord">
		<table cellpadding="0" cellspacing="0" border="0"
			class="buyinfor-table">
			<tr>
				<td align="right"><label class="control-label np">上门催收时间：</label>
				</td>
				<td><input id="smcs_time" class="smallicontm form-control"
					onclick="laydate()" /></td>
				<td align="right"><label class="control-label np">催收结果：</label>
				</td>
				<td><select id="resultCollection1" class="select-control"></select>
				</td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">诚信状态：</label>
				</td>
				<td><select id="statusTrustCus" name="statusTrustCus" class="select-control">
				</select></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">催收记录：</label>
				</td>
				<td colspan="3"><textarea id="csRecord1" row="20" cols="5" class="form-control"></textarea></td>
			</tr>
		</table>
		<div class="padding-nono">
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
			<tr>
				<td width="100%" align="center">
					<div class="ibox-content">
						<button class="btn dpbtn_green" type="button"
							onclick="commitsmcsRecord();">提交</button>
						<button class="btn dpbtn_red" type="button"
							onclick="smcscancel();">取消</button>
					</div>
				</td>
			</tr>
		</table>
		</div>
	</div>
	<!-- 垫款收支记录 -->
	<div id="dkszjl" class="dkszjl">
		<table cellpadding="0" cellspacing="0" border="0"
			class="buyinfor-table">
			<tr>
				<td align="right"><label class="control-label np">凭证编号：</label>
				</td>
				<td><input id="numVoucher" type="text" class="form-control" />
				</td>

				<td align="right"><label class="control-label np">收/支：</label>
				</td>
				<td><select id="fundDirection" class="select-control">
						<option value="01">收入</option>
						<option value="02">支出</option>
				</select></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">金额：</label></td>
				<td><input id="amount" type="text" class="form-control" /></td>

				<td align="right"><label class="control-label np">收/支：</label>
				</td>
				<td><select id="advanceAccountNature" class="select-control">
				</select></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">交易日期：</label>
				</td>
				<td><input id="dateDeal" name="" type="text"
					class="smallicontm form-control" required="" aria-required="true"
					onclick="laydate()" /></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">备注：</label></td>
				<td colspan="3"><textarea id="dkszRemarks" type="text"
						class="form-control"></textarea></td>
			</tr>


			<tr>
				<td align="right"><label class="control-label np">负责人：</label>
				</td>
				<td><input id="operator" type="text" class="form-control" /></td>

				<td align="right"><label class="control-label np">经办人：</label>
				</td>
				<td><input id="dkszOperator" readonly="readonly" type="text"
					class="form-control" value="${current_user_key.uname}" /></td>
			</tr>

			<tr>
				<td align="right"><label class="control-label np">录入日期：</label>
				</td>
				<td><input id="kdsz_date" readonly="readonly" type="text"
					class="smallicontm form-control" required="" aria-required="true"
					onclick="laydate()" /></td>
			</tr>
		</table>
		<div class="padding-nono">
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
			<tr>
				<td width="100%" align="center">
					<div class="ibox-content">
						<button class="btn dpbtn_green" type="button"
							onclick="dkszsave();">提交</button>
						<button class="btn dpbtn_red" type="button"
							onclick="dkszcancel();">取消</button>
					</div>
				</td>
			</tr>
		</table>
		</div>
	</div>
	<!-- 赔款收支记录 -->
	<div id="pkszjl" class="pkszjl">
		<table cellpadding="0" cellspacing="0" border="0"
			class="buyinfor-table">
			<tr>
				<td align="right"><label class="control-label np">凭证编号：</label>
				</td>
				<td><input id="pknumVoucher" type="text" class="form-control" />
				</td>

				<td align="right"><label class="control-label np">收/支：</label>
				</td>
				<td><select id="pkfundDirection" class="select-control">
						<option value="01">收入</option>
						<option value="02">支出</option>
				</select></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">金额：</label></td>
				<td><input id="pkamount" type="text" class="form-control" /></td>

				<td align="right"><label class="control-label np">账户性质：</label>
				</td>
				<td><select id="typeIndemnity" class="select-control">
				</select></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">交易日期：</label>
				</td>
				<td><input id="pkdateDeal" name="" type="text"
					class="smallicontm form-control" required="" aria-required="true"
					onclick="laydate()" /></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">备注：</label></td>
				<td colspan="3"><textarea id="pkszRemarks" type="text"
						class="form-control"></textarea></td>
			</tr>


			<tr>
				<td align="right"><label class="control-label np">负责人：</label>
				</td>
				<td><input id="pkoperator" type="text" class="form-control" />
				</td>

				<td align="right"><label class="control-label np">经办人：</label>
				</td>
				<td><input id="pkszOperator" type="text" readonly="readonly"
					class="form-control" value="${current_user_key.uname}" /></td>
			</tr>

			<tr>
				<td align="right"><label class="control-label np">录入日期：</label>
				</td>
				<td><input id="pklr_date" name="" readonly="readonly"
					type="text" class="smallicontm form-control" required=""
					aria-required="true" onclick="laydate()" /></td>
			</tr>
		</table>
		<div class="padding-nono">
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
			<tr>
				<td width="100%" align="center">
					<div class="ibox-content">
						<button class="btn dpbtn_green" type="button"
							onclick="pkszsave();">提交</button>
						<button class="btn dpbtn_red" type="button"
							onclick="pkszcancel();">取消</button>
					</div>
				</td>
			</tr>
		</table>
		</div>
	</div>
	<!-- 追偿收支记录 -->
	<div id="zcszjl" class="zcszjl">
		<table cellpadding="0" cellspacing="0" border="0"
			class="buyinfor-table">
			<tr>
				<td align="right"><label class="control-label np">凭证编号：</label>
				</td>
				<td><input id="zcnumVoucher" type="text" class="form-control" />
				</td>

				<td align="right"><label class="control-label np">收/支：</label>
				</td>
				<td><select id="zcfundDirection" class="select-control">
						<option value="01">收入</option>
						<option value="02">支出</option>
				</select></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">金额：</label></td>
				<td><input id="zcamount" type="text" class="form-control" /></td>

				<td align="right"><label class="control-label np">委外公司名：</label>
				</td>
				<td><input id="companyEntrust" type="text" class="form-control" />
				</td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">交易日期：</label>
				</td>
				<td><input id="zcdateDeal" name="" type="text"
					class="smallicontm form-control" required="" aria-required="true"
					onclick="laydate()" /></td>
			</tr>
			<tr>
				<td align="right"><label class="control-label np">备注：</label></td>
				<td colspan="3"><textarea id="zcszRemarks" type="text"
						class="form-control"></textarea></td>
			</tr>


			<tr>
				<td align="right"><label class="control-label np">负责人：</label>
				</td>
				<td><input id="zcoperator" type="text" class="form-control" />
				</td>

				<td align="right"><label class="control-label np">经办人：</label>
				</td>
				<td><input id="zcszOperator" readonly="readonly" type="text"
					class="form-control" value="${current_user_key.uname}" /></td>
			</tr>

			<tr>
				<td align="right"><label class="control-label np">录入日期：</label>
				</td>
				<td><input id="zclr_date" readonly="readonly" type="text"
					class="smallicontm form-control" required="" aria-required="true"
					onclick="laydate()" /></td>
			</tr>
		</table>
		<div class="padding-nono">
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
			<tr>
				<td width="100%" align="center">
					<div class="ibox-content">
						<button class="btn dpbtn_green" type="button"
							onclick="zcszsave();">提交</button>
						<button class="btn dpbtn_red" type="button"
							onclick="zcszcancel();">取消</button>
					</div>
				</td>
			</tr>
		</table>
		</div>
	</div>

	<!-- 新建律师函 -->
	<form class="form-horizontal" id="commentForm">
		<div id="lvsrecord" class="lvsrecord">
				<table cellpadding="0" cellspacing="0" border="0"
					class="buyinfor-table">
					<tr>
						<td align="right"><label class="control-label np">逾期次数：</label>
						</td>
						<td><input id="yqCount" type="text" class="form-control"
							readonly="readonly" /></td>
						<td align="right"><label class="control-label np">逾期金额：</label>
						</td>
						<td><input id="yqAmount" type="text" class="form-control"
							readonly="readonly" /></td>
					</tr>
					<tr>
						<td align="right"><label class="control-label np">快递单号：</label>
						</td>
						<td><input id="noExpress" type="text" class="form-control"
							placeholder="快递单号(必填)" required="required" /></td>
						<td align="right"><label class="control-label np">邮寄时间：</label>
						</td>
						<td><input id="sendTime" name="sendTime" type="text"
							placeholder="邮寄时间(必填)" required="required"
							class="smallicontm form-control" onclick="laydate()" /></td>
					</tr>

					<tr>
						<td align="right"><label class="control-label np">快递公司：</label>
						</td>
						<td><select id="companyExpress" name="companyExpress"
							class="select-control">
						</select></td>
					</tr>
					<tr>
						<td align="right" valign="top"><label
							class="control-label np">备注：</label></td>
						<td colspan="3"><textarea rows="" cols=""
								class="form-control" id="lvshremarks" name="remarks"></textarea>
						</td>
					</tr>

				</table>
				<div class="padding-nono">
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
					<tr>
						<td width="100%" align="center">
							<div class="ibox-content">
								<button class="btn dpbtn_green" type="button"
									onclick="lvssave();">提交</button>
								<button class="btn dpbtn_red" type="button"
									onclick="lvscancel();">取消</button>
							</div>
						</td>
					</tr>
				</table>
				</div>
		</div>
	</form>
	
	<!-- 拖车记录 -->
	<div id="tcsbrecord" class="tcsbrecord" style="display: none">
			<table cellpadding="0" cellspacing="0" border="0"
				class="buyinfor-table">
				<tr>
					<td align="right"><label class="control-label np">拖车时间：</label>
					</td>
					<td><input id="tc_timeFail" class="smallicontm form-control"
						onclick="laydate()" /></td>
					<td align="right"><label class="control-label np">拖车地：</label>
					</td>
					<td><input id="addrParkFail" type="text" class="form-control" />
					</td>
				</tr>
				<tr>
					<td align="right" valign="top"><label class="control-label np">备注：</label>
					</td>
					<td colspan="3"><textarea id="remarkApply"
							class="form-control"></textarea></td>
				</tr>
				<tr>
					<td align="right"><label class="control-label np">经办人：</label>
					</td>
					<td><input class="form-control" readonly="readonly"
						type="text" id="tcsb_operator" name=""
						value="${current_user_key.uname}"></td>
					<td align="right"><label class="control-label np">经办时间：</label>
					</td>
					<td><input id="tcsb_operatorTime" name="" placeholder="经办时间"
						class="smallicontm form-control" onclick="laydate()"></td>
				</tr>

			</table>
			<div class="padding-nono">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td width="100%" align="center">
						<div class="ibox-content">
							<button class="btn dpbtn_green" type="button"
								onclick="tcsbsave();">提交</button>
							<button class="btn dpbtn_red" type="button"
								onclick="tcsbcancel();">取消</button>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
	
	<div id="layer-message" class="layer-message">
		<ul id="layerUL">
		</ul>
	</div>
	
	<%@include file="/jsp/comm_js_include.jsp"%>
	<script type="text/javascript">
	var dueResonlayer;
 	
 	var dueReson=function(){
 		dueResonlayer = layer.open({
 			 title:'案件性质选择',
			  type: 1,
			  area: ['350px', '400px'], //宽高
			  content: $('#layer-message')
    	});
	}
 	
	 var tcdjCreatelayer;
     var tcdjCreate=function(){
     	tcdjCreatelayer=layer.open({
				  title:'拖车失败记录',
				  type: 1,
				  area: ['600px', '400px'], //宽高
				  content: $('#tcsbrecord'),
				  end: function () 
		    	  {
		    		  refreshh();
		          }
			});
     }
     
     var tcsbcancel=function(){
     	layer.closeAll();
     }
     
     var createdcRecordlayer;
     var createdcRecord=function(){
     	createdcRecordlayer=layer.open({
				  title:'电催记录',
				  type: 1,
				  area: ['640px', '400px'], //宽高
				  content: $('#dcrecord'),
				  end: function () 
		    	  {
		    		  refreshb();
		          }
			});
     }
     
     var dccancel=function(){
     	layer.closeAll();
     }
     
     
     var createsmcsRecordlayer;
     var createsmcsRecord=function(){
     	createsmcsRecordlayer=layer.open({
				  title:'上门催收记录',
				  type: 1,
				  area: ['640px', '400px'], //宽高
				  content: $('#smcsrecord'),
				  end: function () 
		    	  {
		    		  refreshc();
		          }
			});
     }
     
     var smcscancel=function(){
     	layer.closeAll();
     }
		
     
     
     var dkszCreatelayer;
     var dkszCreate=function(){
     	dkszCreatelayer=layer.open({
				  title:'垫款收支记录',
				  type: 1,
				  area: ['640px', '530px'], //宽高
				  content: $('#dkszjl'),
				  end: function () 
		    	  {
		    		  refreshd();
		          }
			});
     }
		
     var dkszcancel=function(){
     	layer.closeAll();
     }
     
     var pkszCreatelayer;
     var pkszCreate=function(){
     	pkszCreatelayer=layer.open({
				  title:'赔款收支记录',
				  type: 1,
				  area: ['640px', '530px'], //宽高
				  content: $('#pkszjl'),
				  end: function () 
		    	  {
		    		  refreshe();
		          }
			});
     }
		
     var pkszcancel=function(){
     	layer.closeAll();
     }
     
     var zcszCreatelayer;
     var zcszCreate=function(){
     	zcszCreatelayer=layer.open({
				  title:'追偿收支记录',
				  type: 1,
				  area: ['640px', '530px'], //宽高
				  content: $('#zcszjl'),
				  end: function () 
		    	  {
		    		  refreshf();
		          }
			});
     }

     var  zcszcancel=function(){
     	layer.closeAll();
     }
	
	   /* <!--      上门催收弹出层 --> */
	var commitsmcsRecord=function(){
    	var timeCollection=$("#smcs_time").val();
    	var resultCollection=$('#resultCollection1 option:selected').val();
    	var remarks=$("#csRecord1").val();
    	var statusTrustCus=$('#statusTrustCus option:selected').val();
    	var data={
    			"resultCollection":resultCollection,
    			"timeCollection":timeCollection,
    			"remarks":remarks,
    			"statusTrustCus":statusTrustCus,
    			"busiId":$.getUrlData("busiId"),
    			"cusId":$.getUrlData("cusId"),
    			"overdueId":$.getUrlData("overdueId")
    	};
    	$.dpAjax({
    		show:false,
    		url:'${basePath}/DhOverdueCollectionHomeController/save',
    		data:data,
			success: function(datas){
				  layer.msg('执行成功！', {icon: 6});
				  layer.close(createsmcsRecordlayer);
				  $("#smcs_time").val("");
				  $("#resultCollection1").val("");
				  $("#csRecord1").val("");
				  $("#statusTrustCus").val("");
				  return;
             }
    	});
    }
	
	/* <!--      电催弹出层 --> */
	var commitdcRecord=function(){
       	var timeCollection=$("#dc_time").val();
       	var promissTime=$("#promiss_time").val();
       	var dueReson=$("#dueResonVal").val();
       	var csRecord=$("#csRecord").val();
       	var statusRepayment=$('input:radio[name="statusPay"]:checked').val();
       	var data={};
       	data.timeCollection=timeCollection;
       	data.timeRepaymentPromise=promissTime;
       	data.reasonOverdue=dueReson;
       	data.remarks=csRecord;
       	data.statusRepayment=statusRepayment;
       	data.busiId=$.getUrlData("busiId");
       	data.cusId=$.getUrlData("cusId");
       	data.overdueId=$.getUrlData("overdueId");
       	$.dpAjax({
       		show:false,
    		url:'${basePath}/DhOverdueCollectionPhoneController/save',
    		data:data,
   			success: function(datas){
   				  layer.msg('执行成功！', {icon: 6});
				  layer.close(createdcRecordlayer);
				  $("#dc_time").val("");
			      $("#promiss_time").val("");
			      $("#dueReson").val("");
			      $("#csRecord").val("");
				  return;
                }
    	});
    }
	
	/* <!-- 垫款收支记录 --> */
	var dkszsave=function(){
        	var data={};
        	data.numVoucher=$("#numVoucher").val();
        	data.dateDeal=$("#dateDeal").val();
        	data.fundDirection=$('#fundDirection option:selected').val();
        	data.advanceAccountNature=$('#advanceAccountNature option:selected').val();
        	data.amount=$("#amount").val();
        	data.kdszDate=$("#kdsz_date").val();
        	data.creatorName=$("#dkszOperator").val();
        	data.operator=$("#operator").val();
        	data.remarks=$("#dkszRemarks").val();
        	data.creator="${current_user_key.id}";
        	data.busiId= $.getUrlData("busiId");
        	data.cusId= $.getUrlData("cusId");
        	$.dpAjax({
        		show:false,
	    		url:'${basePath}/DhAdvanceSublistController/save',
	    		data:data,
    			success: function(datas){
    				  layer.msg('执行成功！', {icon: 6});
					  layer.close(dkszCreatelayer);
					  $("#numVoucher").val("");
					  $("#amount").val("");
					  $("#advanceAccountNature").val("");
					  $("#dateDeal").val("");
					  $("#dkszRemarks").val("");
					  $("#operator").val("");
					  
					  return;
                 }
	    	});
        }
	
	/* <!-- 赔款收支记录 --> */
	var pkszsave=function(){
        	var data={};
        	data.numVoucher=$("#pknumVoucher").val();
        	data.dateDeal=$("#pkdateDeal").val();
        	data.fundDirection=$('#fundDirection option:selected').val();
        	data.typeIndemnity=$('#typeIndemnity option:selected').val();
        	data.amount=$("#pkamount").val();
        	data.creatorName=$("#pkszOperator").val();
        	data.operator=$("#pkoperator").val();
        	data.creator="${current_user_key.id}";
        	data.remarks=$("#pkszRemarks").val();
        	data.kdszDate=$("#pklr_date").val();
        	data.busiId= $.getUrlData("busiId");
        	data.cusId= $.getUrlData("cusId");
        	$.dpAjax({
        		show:false,
	    		url:'${basePath}/DhAdvanceIndemnityController/save',
	    		data:data,
    			success: function(datas){
    				  layer.msg('执行成功！', {icon: 6});
					  layer.close(pkszCreatelayer);
					  $("#pknumVoucher").val("");
					  $("#pkamount").val("");
					  $("#pkdateDeal").val("");
					  $("#pkszRemarks").val("");
					  $("#pkoperator").val("");
					  return;
                 }
	    	});
        }
	
	/* <!-- 追偿收支记录 --> */
	var zcszsave=function(){
        	var data={};
        	data.numVoucher=$("#zcnumVoucher").val();
        	data.dateDeal=$("#zcdateDeal").val();
        	data.fundDirection=$("#zcfundDirection").val();
        	data.companyEntrust=$("#companyEntrust").val();
        	data.amount=$("#zcamount").val();
        	data.remarks=$("#zcszRemarks").val();
        	data.creatorName=$("#zcszOperator").val();
        	data.operator=$("#zcoperator").val();
        	data.creator="${current_user_key.id}";
        	data.kdszDate=$("#zclr_date").val();
        	data.busiId= $.getUrlData("busiId");
        	data.cusId= $.getUrlData("cusId");
        	$.dpAjax({
        		show:false,
	    		url:'${basePath}/DhAdvancePursuingController/save',
	    		data:data,
    			success: function(datas){
    				  layer.msg('执行成功！', {icon: 6});
					  layer.close(zcszCreatelayer);
					  $("#zcnumVoucher").val("");
					  $("#zcamount").val("");
					  $("#companyEntrust").val("");
					  $("#zcdateDeal").val("");
					  $("#zcszRemarks").val("");
					  $("#zcoperator").val("");
					  return;
                 }
	    	});
        }
	
	/* <!-- 拖车记录 --> */
	var tcsbsave = function () 
    	{
    		var tc_timeFail=$("#tc_timeFail").val();
    		var addrParkFail=$("#addrParkFail").val();
    		var remarkApply=$("#remarkApply").val();
           	var data={};
           	data.creatorName=$("#tcsb_operator").val();
           	data.jbDate=$("#tcsb_operatorTime").val();
           	data.creator="${current_user_key.id}";
           	data.busiId= $.getUrlData("busiId");
	    	data.cusId= $.getUrlData("cusId");
           	//拖车失败参数
           	if(tc_timeFail !="" || addrParkFail !="" || remarkApply!=""){
           		data.timeTrailer=tc_timeFail;
           		data.addrPark=addrParkFail;
           		data.remarkApply=remarkApply;
           		data.statusTrailer=30;
           	}
       		$.dpAjax({
       			show:false,
	    		url:'${basePath}/DhOverdueTrailerRecordController/insert',
	    		data:data,
    			success: function(datas){
    				  layer.msg('执行成功！', {icon: 6});
					  layer.close(tcdjCreatelayer);
					  $("#tc_timeFail").val("");
					  $("#addrParkFail").val("");
					  $("#remarkApply").val("");
					  refreshh();
					  return;
                }
    		});
    	}
	</script>